package com.nokia.pc3.core.xform;

import org.apache.commons.codec.binary.Base64;
import org.apache.commons.codec.binary.StringUtils;

/**
 * base64 encoder decorder utility for passing special characters or binary
 * data within a configuration descriptor.
 * 
 * @author jcroke
 *
 */
public class Base64ende {
	
	public static String decode(String s) {
		return StringUtils.newStringUtf8(Base64.decodeBase64(s));
	}

	public static String encode(String s) {
		return Base64.encodeBase64String(StringUtils.getBytesUtf8(s));
	}
}